package com.wwe.kotlinstudy.dm.fifteen;

/**
 * @name KotlinStudy
 * @package name：com.wwe.kotlinstudy.dm.fifteen
 * @anthor DavidZhang
 * @time 2018/5/25 10:40
 * @class describe
 */
public class MyMediator implements Mediator {

    private User1 user1;
    private User2 user2;

    public User2 getUser2() {
        return user2;
    }

    public User1 getUser1() {
        return user1;
    }

    @Override
    public void creatMediator() {
        user1 = new User1(this);
        user2 = new User2(this);
    }

    @Override
    public void allWorkers() {
        user1.work();
        user2.work();
    }
}
